import { fromJS } from 'immutable';
import reducerHandler from 'shared/utils/reducerHandler';
import { TAG_LIST,WEDTYPE_LIST } from './actionTypes';

const initialState = fromJS({
  tagListData:{},
  wedTypeList:{}
});

const handlers = {
  [TAG_LIST](state, { payload }) {
    const newState = state.set('tagListData', payload);
    return newState;
  },
  [WEDTYPE_LIST](state, { payload }) {
    const newState = state.set('wedTypeList', payload);
    return newState;
  }
};

export default reducerHandler(initialState, handlers);
